package com.example.redissondemo.utils;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

/**
 * @author Liunh
 */
public class Constant {

    public static final Charset COMMON_ENCODING = StandardCharsets.UTF_8;

    public static final String YES = "Y";
    public static final String NO = "N";
    public static final String TRUE_STRING = "true";
    public static final String FALSE_STRING = "false";
    public static final String UNKNOWN = "unknown";
    public static final String NULL_STRING = "null";
    public static final String SAVE = "save";
    public static final String UPDATE = "update";
    public static final String PAGE = "page";
    public static final String SORT = "sort";
    public static final String SORT_ORDER_BY = " ORDER BY ";
    public static final String SORT_ASC = " ASC ";
    public static final String SORT_DESC = " DESC ";
    public static final String BIRTHDAY = "birthDay";
    public static final String LINUX = "linux";
    public static final String WINDOWS = "win";

    public static final String EXTENSION_NAME_XLS = ".xls";
    public static final String EXTENSION_NAME_XLSX = ".xlsx";
    public static final String EXTENSION_NAME_TXT = ".txt";
    public static final String EXTENSION_NAME_DOC = ".doc";

    public static final String MIDDLE_HORIZONTAL_LINE = "-";
    public static final String SYMBOL_COLON = ":";
    public static final String SYMBOL_SINGLE_QUOTATION_MARK = "'";
    public static final String SYMBOL_SINGLE_QUOTATION_MARK1 = "`";
    public static final String DOUBLE_QUOTATION_MARKS = "\"";
    public static final String POINT_NUMBER = ".";
    public static final String SYMBOL_COMMA = ",";
    public static final String SYMBOL_SINGLE_SLASH = "/";
    public static final String SYMBOL_WRAP = "\r\n";

    public static final int NUMBER_ZERO = 0;
    public static final int NUMBER_ONE = 1;
    public static final int NUMBER_TWO = 2;
    public static final int NUMBER_THREE = 3;
    public static final int NUMBER_FOUR = 4;
    public static final int NUMBER_FIVE = 5;
    public static final int NUMBER_SIX = 6;
    public static final int NUMBER_SEVEN = 7;
    public static final int NUMBER_EIGHT = 8;
    public static final int NUMBER_NINE = 9;
    public static final int NUMBER_TEN = 10;
    public static final int NUMBER_MINUS_ONE = -1;

    public static final String NUMBER_ZERO_STRING = "0";
    public static final String NUMBER_ONE_STRING = "1";
    public static final String NUMBER_TWO_STRING = "2";
    public static final String NUMBER_THREE_STRING = "3";
    public static final String NUMBER_FOUR_STRING = "4";
    public static final String NUMBER_FIVE_STRING = "5";
    public static final String NUMBER_SIX_STRING = "6";
    public static final String NUMBER_SEVEN_STRING = "7";
    public static final String NUMBER_EIGHT_STRING = "8";
    public static final String NUMBER_NINE_STRING = "9";
    public static final String NUMBER_TEN_STRING = "10";
    public static final String NUMBER_MINUS_ONE_STRING = "-1";

    public static final int EXPORT_DATA_MAX_COUNT = 200000;

    public static final String ORG_TYPE1 = "区";
    public static final String ORG_TYPE2 = "区教育局";
    public static final String ORG_TYPE3 = "服务中心";
    public static final String ORG_TYPE4 = "评估中心";
    public static final String ORG_TYPE5 = "研究院";
    public static final String ORG_TYPE6 = "学校";
    public static final String ORG_TYPE7 = "高中";
    public static final String ORG_TYPE8 = "中学";
    public static final String ORG_TYPE9 = "小学";
    public static final String ORG_TYPE10 = "幼儿园";
    public static final String ORG_TYPE11 = "培训";
    public static final String ORG_TYPE12 = "市";
    public static final String ORG_TYPE13 = "县";

    /**
     * 正则表达式
     */
    public static final String REGEXP_NUMBER = "^[0-9]+$";
    public static final String REGEXP_EN = "^[A-Za-z]+$";
    public static final String REGEXP_CONTAINS_CHINESE = "^.*[\\u4e00-\\u9fa5].+$";
    public static final String REGEXP_CONTAINS_CHINESE2 = "[\\u4E00-\\u9FA5]";
    public static final String REGEXP_CONTAINS_CHINESE1 = "^[A-Za-z0-9\\u4e00-\\u9fa5]+$";
    public static final String REGEXP_CAPTCHA_CODE = "^[A-Za-z0-9]{4}$";
    public static final String REGEXP_CAPTCHA_CODE1 = "(?=.+\\d).+"; // "(?=.+\\d)(?=.+\\D).+"
    public static final String REGEXP_LOGIN_NAME = "^[a-zA-Z]+[\\w]{2,19}$";
    public static final String REGEXP_PASSWORD = "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,9999}$";
    public static final String REGEXP_STAFF_NO = "^[a-zA-Z]+[\\w]{2,19}$/g";
    public static final String REGEXP_AUTH_CODE = "^[A-Za-z0-9]{6}$";

    /**
     * yyyy-MM-dd HH:mm:ss
     */
    public static final String REGEXP_TIME_0 = "^\\d{4}-\\d{1,2}-\\d{1,2}[\\s]{1}\\d{1,2}[:]{1}\\d{1,2}[:]{1}\\d{1,2}$";
    /**
     * yyyy-MM-dd
     */
    public static final String REGEXP_TIME_1 = "^([0-9]{4})-([0-9]{2})-([0-9]{2})$";
    /**
     * yyyy/MM/dd
     */
    public static final String REGEXP_TIME_2 = "^([0-9]{4})/([0-9]{2})/([0-9]{2})$";
    /**
     * dd/MM/yyyy
     */
    public static final String REGEXP_TIME_3 = "^([0-9]{2})/([0-9]{2})/([0-9]{4})$";
    /**
     * yyyy/MM/dd HH:mm:ss
     */
    public static final String REGEXP_TIME_4 = "^([0-9]{4})/([0-9]{2})/([0-9]{2})[\\s]{1}\\d{1,2}[:]{1}\\d{1,2}[:]{1}\\d{1,2}$";
    /**
     * yyyyMMddHHmmss
     */
    public static final String REGEXP_TIME_5 = "^[0-9]{14}$";
    /**
     * yyyyMMdd
     */
    public static final String REGEXP_TIME_6 = "^[0-9]{8}$";

    /**
     * 系统配置 key
     */
    public static final String READER_MASK_ACCOUNT_NO_KEY = "reader_mask_account_no_enable";
    public static final String READER_MASK_IDENTY_ID_KEY = "reader_mask_identy_id_enable";
    public static final String READER_MASK_MOBIL_NO_KEY = "reader_mask_mobil_no_enable";
    public static final String READER_MASK_READER_NAME_KEY = "reader_mask_reader_name_enable";
    public static final String READER_MASK_STUDENT_CODE_KEY = "reader_mask_student_code_enable";
    public static final String USER_MASK_REAL_NAME_KEY = "user_mask_real_name_enable";
    public static final String USER_MASK_MOBILE_NO_KEY = "user_mask_mobile_no_enable";
    public static final String USER_MASK_IDENTITY_ID_KEY = "user_mask_identity_id_enable";
    public static final String USER_LOGIN_ERROR_COUNT_KEY = "user_login_error_count";
    public static final String USER_PASSWORD_FORMAT_CHECKS_KEY = "user_password_format_checks_enable";
    public static final String USER_UPDATE_PWD_INTERVAL_DAY = "user_update_pwd_interval_day";
    public static final String APP_VALID_CAPTCHA_ENABLE_KEY = "app_valid_captcha_enable";
    public static final String APP_SIGN_ENABLED_KEY = "app_external_sign_enabled";
    public static final String APP_EXTERNAL_TOKEN_KEY = "app_external_token_enabled";
    public static final String APP_EXTERNAL_TOKEN_TIME_KEY = "app_external_token_time";
    public static final String APP_PLATFORM_TOKEN_KEY = "app_platform_token_enabled";
    public static final String APP_PLATFORM_TOKEN_TIME_KEY = "app_platform_token_time";
    public static final String APP_EXPORT_DATA_COUNT_KEY = "app_export_data_count";
    public static final String APP_IS_COLLECT_DATA_BY_MQ_KEY = "app_collect_data_by_mq_enable";
    public static final String APP_IS_SAVE_COLLECTION_SUCCESS_LOG_KEY = "app_save_collection_success_log_enable";
    public static final String APP_IS_PRINTOUT_COLLECTION_LOG_KEY = "app_print_out_collection_log_enable";
    public static final String APP_IS_PRINTOUT_COLLECTION_BOOK_LOG_KEY = "app_print_out_collection_book_log_enable";
    public static final String APP_IS_PRINTOUT_COLLECTION_EBOOK_LOG_KEY = "app_print_out_collection_ebook_log_enable";
    public static final String APP_IS_PRINTOUT_COLLECTION_LOAN_LOG_KEY = "app_print_out_collection_loan_log_enable";
    public static final String APP_IS_PRINTOUT_COLLECTION_READER_LOG_KEY = "app_print_out_collection_reader_log_enable";
    public static final String APP_IS_PRINTOUT_COLLECTION_ENTRY_RECORD_LOG_KEY = "app_print_out_collection_entry_record_log_enable";
    public static final String APP_PRINT_OUT_COLLECTION_STATISTICS_LOG_KEY = "app_print_out_collection_statistics_log_enable";
    public static final String APP_SYS_AUTO_INIT_CONFIG_MARK = "app_sys_auto_init_config_mark";
    public static final String APP_IS_TIME_PERIOD_FOR_BASE_OVERVIEW = "app_is_time_period_for_base_overview";
    public static final String APP_PLATFORM_FILE_UPLOAD_BACKUP_SCRIPT = "app_platform_file_upload_backup_script";
    public static final String APP_PLATFORM_REVIEW_REMIND_BEFORE_DAY = "app_platform_review_remind_before_day";
    public static final String APP_PLATFORM_NAME_KEY = "app_platform_name";
    public static final String APP_PLATFORM_DOMAIN_KEY = "app_platform_domain";
    public static final String APP_PLATFORM_NAME_DEFAULT = "中小学图书管理平台";
    public static final String APP_PLATFORM_LOGO_KEY = "app_platform_logo";
    public static final String APP_PLATFORM_LOGO_DEFAULT = "img/logo.8e46bd8a.png";
    public static final String APP_PLATFORM_COPYRIGHT_KEY = "app_platform_copyright";
    public static final String APP_PLATFORM_COPYRIGHT_DEFAULT = "版权所有©广东天卷教育设备有限公司2024 技术支持：18812345678\n\n粤公网安备44010502002734 | 粤ICP备20066829号 增值电信业务经营许可证：牌照粤B2-76768344-1";

    /**
     * 大数据
     */
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE1 = "table_head_big_data_fields_datatype1";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE8 = "table_head_big_data_fields_datatype8";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE9 = "table_head_big_data_fields_datatype9";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE17 = "table_head_big_data_fields_datatype17";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE19 = "table_head_big_data_fields_datatype19";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE20 = "table_head_big_data_fields_datatype20";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE22 = "table_head_big_data_fields_datatype22";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE24 = "table_head_big_data_fields_datatype24";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE25 = "table_head_big_data_fields_datatype25";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE13 = "table_head_big_data_fields_datatype13";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE28 = "table_head_big_data_fields_datatype28";
    public static final String TABLE_HEAD_BIG_DATA_FIELDS_DATATYPE31 = "table_head_big_data_fields_datatype31";

    public static final String BIG_DATA_INIT_FIELDS_ARR1 = "[collectionTotal,readerTotal,personCollectionTotal,totalPrice]";
    public static final String BIG_DATA_INIT_FIELDS_ARR8 = "[title,totalBorrow]";
    public static final String BIG_DATA_INIT_FIELDS_ARR9 = "[readerName,totalBorrow]";
    public static final String BIG_DATA_INIT_FIELDS_ARR17 = "[orgName,collectionTotal]";
    public static final String BIG_DATA_INIT_FIELDS_ARR19 = "[orgName,title]";
    public static final String BIG_DATA_INIT_FIELDS_ARR20 = "[orgName,entryLibraryTotal]";
    public static final String BIG_DATA_INIT_FIELDS_ARR22 = "[totalBorrow,yearBorrow]";
    public static final String BIG_DATA_INIT_FIELDS_ARR24 = "[orgName,totalBorrow]";
    public static final String BIG_DATA_INIT_FIELDS_ARR25 = "[publishYear,totalBorrow]";
    public static final String BIG_DATA_INIT_FIELDS_ARR13 = "[orgName,dateTime,borrowCount]";


    /**
     * 导入导出
     */
    public static final String IMPORT_BOOK_KEY = "IMPORT_BOOK_DATA_KEY";
    public static final String EXPORT_BOOK_KEY = "EXPORT_BOOK_DATA_KEY";

    public static final String IMPORT_EBOOK_KEY = "IMPORT_EBOOK_DATA_KEY";
    public static final String EXPORT_EBOOK_KEY = "EXPORT_EBOOK_DATA_KEY";

    public static final String IMPORT_EBOOK_COLLECTED_KEY = "IMPORT_EBOOK_COLLECTED_DATA_KEY";
    public static final String EXPORT_EBOOK_COLLECTED_KEY = "EXPORT_EBOOK_COLLECTED_DATA_KEY";

    public static final String IMPORT_EBOOK_HITS_READING_KEY = "IMPORT_EBOOK_HITS_READING_DATA_KEY";
    public static final String EXPORT_EBOOK_HITS_READING_KEY = "EXPORT_EBOOK_HITS_READING_DATA_KEY";

    public static final String IMPORT_LOAN_KEY = "IMPORT_LOAN_DATA_KEY";
    public static final String EXPORT_LOAN_KEY = "EXPORT_LOAN_DATA_KEY";

    public static final String IMPORT_READER_KEY = "IMPORT_READER_DATA_KEY";
    public static final String EXPORT_READER_KEY = "EXPORT_READER_DATA_KEY";

    public static final String IMPORT_CLEANING_KEY = "IMPORT_CLEANING_DATA_KEY";
    public static final String EXPORT_CLEANING_KEY = "EXPORT_CLEANING_DATA_KEY";

    public static final String IMPORT_PLATFORM_KEY = "IMPORT_PLATFORM_DATA_KEY";

    public static final String IMPORT_RECOMMENDATION_KEY = "IMPORT_RECOMMENDATION_DATA_KEY";
    public static final String EXPORT_RECOMMENDATION_KEY = "EXPORT_RECOMMENDATION_DATA_KEY";

    public static final String EXPORT_STATISTICS_KEY = "EXPORT_STATISTICS_DATA_KEY";

    public static final String IMPORT_STATISTICS_EBOOK_KEY = "IMPORT_STATISTICS_DATA_EBOOK_KEY";
    public static final String EXPORT_STATISTICS_EBOOK_KEY = "EXPORT_STATISTICS_DATA_EBOOK_KEY";

    public static final String IMPORT_ENTRY_RECORD_KEY = "IMPORT_ENTRY_RECORD_DATA_KEY";
    public static final String EXPORT_ENTRY_RECORD_KEY = "EXPORT_ENTRY_RECORD_DATA_KEY";

    public static final String IMPORT_DEPARTMENT_KEY = "IMPORT_DEPARTMENT_DATA_KEY";
    public static final String EXPORT_DEPARTMENT_KEY = "EXPORT_DEPARTMENT_DATA_KEY";

    /**
     * 图书排查操作指引与政策文件
     */
    public static final String BOOK_SCREENING_INSTRUCTIONS_KEY = "BOOK_SCREENING_INSTRUCTIONS_KEY";

    public static final String EXPORT_REVIEW_STATISTICS_KEY = "EXPORT_REVIEW_STATISTICS_KEY";
    public static final String EXPORT_RECOMMENDATION_STATISTICS_KEY = "EXPORT_RECOMMENDATION_STATISTICS_KEY";


    /**
     * 登录
     */
    public static final String LOGIN_SUCCESS = "登录成功";
    public static final String LOGIN_FAIL = "登录失败";
    public static final String LOGIN_SECRET_KEY = "XiaoHua@123456";
    public static final String SESSION_USER = "current_user";
    public static final String LOGIN_FLAG = "isLogin";
    public static final String LOGIN_USER = "loginUser";
    public static final String DEFAULT_PASSWORD = "Abc@123456!";

    /**
     * 注册
     */
    public static final String REG_SUCCESS = "注册成功";
    public static final String REG_FAIL = "注册失败";
    public static final String REG_USER_EXIT = "用户已存在";
    public static final String REG_USER_NICK_EXIST = "该昵称已被使用";

    /**
     * 用户
     */
    public static final String USER_NOT_EXIT = "用户不存在";
    public static final String USER_NAME_NULL = "用户名不能为空";
    public static final String USER_PWD_NULL = "用户密码不能为空";
    public static final String USER_PWD_ERROR = "用户密码不正确";

    public static final String MENU_ROOT_SID = "13210000-0000-0000-0000-000000000001";

    public static final String DS_SESSION_MAP_KEY = "dsSessionMap";
    public static final String DS_SESSION_FACTORY_MAP_KEY = "dsSessionFactoryMap";

}
